﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Models.Common
{
    public class Result<T>
    {
        /// <summary>
        /// 获取或设置 Ajax操作结果类型
        /// </summary>
        public AjaxResultType Type { get; set; }

        /// <summary>
        /// 获取或设置 消息内容
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 获取或设置 返回数据
        /// </summary>
        public T Data { get; set; }
        public int TotalRows { get; set; }
    }
    public enum AjaxResultType
    {
        /// <summary>
        /// 消息结果类型
        /// </summary>
        Info,

        /// <summary>
        /// 成功结果类型
        /// </summary>
        Success,

        /// <summary>
        /// 警告结果类型
        /// </summary>
        Warning,

        /// <summary>
        /// 异常结果类型
        /// </summary>
        Error
    }
    public class GridData<T>
    {
        /// <summary>
        /// 获取或设置 行数据
        /// </summary>
        public List<T> rows { get; set; }

        /// <summary>
        /// 获取或设置 数据行数
        /// </summary>
        public int total { get; set; }
    }

}